package com.tinama.jedis01.demo.proxy;

/**
 * @author lgc
 * @createDate 2021/1/14 - 10:43
 */
public class Test {
    public static void main(String[] args){
        SendSms sendSms = new SendSmsImpl();
        SendSms proxy = (SendSms)JDKProxyFactory.getProxy(sendSms, new InvocationImpl(sendSms));
        proxy.send("林国超");

        OPenPhone oPenPhone = new HuaWeiPhone();
        OPenPhone oPenPhoneProxy = (OPenPhone)JDKProxyFactory.getProxy(oPenPhone, new InvocationImpl(oPenPhone));
        String phone = oPenPhoneProxy.open("168121416");
        System.out.println(phone);
    }
}
